import { sysMessageNotReadCountApi } from '@/api/system/message/SysMessage'
import { useAppStore } from '@/store/modules/app'

const appStore = useAppStore()

export function refreshNotReadCount() {
  const getUnreadMessageCount = async () => {
    const res = await sysMessageNotReadCountApi()
    appStore.setUnreadMessageCount(res.data.siteMessageCount)
  }
  getUnreadMessageCount()
}
